#include "ClientSocket.h"


ClientSocket::ClientSocket(string host, string port)
{
	if(!Socket::Create() )
	{
		//MessageBox(NULL, "create failed", "fail", MB_OK);
	}

	if(!Socket::Connect(host, port) )
	{
		//MessageBox(NULL, "connect failed", "fail", MB_OK);
	}
}

const ClientSocket& ClientSocket::operator << (const string& s) const
{
	if(!Socket::Send(s) )
	{
		//MessageBox(NULL, "send failed", "fail", MB_OK);
	}

	return *this;
}

const ClientSocket& ClientSocket::operator >> (string& s) const
{
	if(!Socket::Recv(s) )
	{
		//MessageBox(NULL, "recv failed", "fail", MB_OK);
	}

	return *this;
}

